#pragma once

#include <Windows.h>

namespace GPUCC
{
	namespace CPU
	{
		class Semaphore
		{
		public:
			Semaphore(const unsigned int Count);
			~Semaphore();

			unsigned int GetCount();

			bool Get(unsigned int Timeout = INFINITE);
			bool Release(const unsigned int Count = 1);

		private:
			HANDLE m_Semaphore;
			const unsigned int m_Count;
		};
	}
}